package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.system.mapper.BrandAudiConfigMapper;
import com.ruoyi.system.domain.BrandAudiConfig;
import com.ruoyi.system.service.IBrandAudiConfigService;

/**
 * 品牌车系Service业务层处理
 * 
 * @author WUYIBO
 * @date 2024-07-16
 */
@Service
public class BrandAudiConfigServiceImpl extends ServiceImpl<BrandAudiConfigMapper, BrandAudiConfig> implements IBrandAudiConfigService
{
    @Autowired
    private BrandAudiConfigMapper brandAudiConfigMapper;

    /**
     * 查询品牌车系
     * 
     * @param id 品牌车系主键
     * @return 品牌车系
     */
    @Override
    public BrandAudiConfig selectBrandAudiConfigById(Long id)
    {
        return brandAudiConfigMapper.selectBrandAudiConfigById(id);
    }

    /**
     * 查询品牌车系列表
     * 
     * @param brandAudiConfig 品牌车系
     * @return 品牌车系
     */
    @Override
    public List<BrandAudiConfig> selectBrandAudiConfigList(BrandAudiConfig brandAudiConfig)
    {
        return brandAudiConfigMapper.selectBrandAudiConfigList(brandAudiConfig);
    }

    /**
     * 新增品牌车系
     * 
     * @param brandAudiConfig 品牌车系
     * @return 结果
     */
    @Override
    public int insertBrandAudiConfig(BrandAudiConfig brandAudiConfig)
    {
        brandAudiConfig.setCreateTime(DateUtils.getNowDate());
        return brandAudiConfigMapper.insertBrandAudiConfig(brandAudiConfig);
    }

    /**
     * 修改品牌车系
     * 
     * @param brandAudiConfig 品牌车系
     * @return 结果
     */
    @Override
    public int updateBrandAudiConfig(BrandAudiConfig brandAudiConfig)
    {
        brandAudiConfig.setUpdateTime(DateUtils.getNowDate());
        return brandAudiConfigMapper.updateBrandAudiConfig(brandAudiConfig);
    }

    /**
     * 批量删除品牌车系
     * 
     * @param ids 需要删除的品牌车系主键
     * @return 结果
     */
    @Override
    public int deleteBrandAudiConfigByIds(Long[] ids)
    {
        return brandAudiConfigMapper.deleteBrandAudiConfigByIds(ids);
    }

    /**
     * 删除品牌车系信息
     * 
     * @param id 品牌车系主键
     * @return 结果
     */
    @Override
    public int deleteBrandAudiConfigById(Long id)
    {
        return brandAudiConfigMapper.deleteBrandAudiConfigById(id);
    }

    @Override
    public List<BrandAudiConfig> selectTreeList(BrandAudiConfig menu, Long userId) {
        return brandAudiConfigMapper.selectTreeList(menu);
    }
}
